package com.airbat.prize.utils;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;

public class XmlUtil {
    public static String CZRKformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_QS_CZRK</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>SYSTEMID,RYBH,DZBM,ZT,ZT_OLD,ZT_ZW,YWLX,SLSJ,ZXBS,SWRQ,SWZXLB,QCRQ,QCZXLB,QWGJ,QWDSSX,QWDSSX_OLD,QWDSSX_ZW,QWDXZ,XMPY,DQM,DQM_OLD,DQM_ZW,SSSSXQ,SSSSXQ_OLD,SSSSXQ_ZW,PCSDM,PCSDM_OLD,PCSDM_ZW,ZRQDM,XZJDDM,JWHDM,JMZDM,SFZMHM,XM,CYM,XB,XB_OLD,XB_ZW,MZ,MZ_OLD,MZ_ZW,CSRQ,CSSJ,CSDGJ,CSDGJ_OLD,CSDGJ_ZW,CSDSSX,CSDSSX_OLD,CSDSSX_ZW,CSDXZ,JGGJ,JGGJ_OLD,JGGJ_ZW,JGSSX,JGSSX_OLD,JGSSX_ZW,JHRYHM,JHRYXM,JHRYGX,JHRYGX_OLD,JHRYGX_ZW,JHREHM,JHREXM,JHREGX,JHREGX_OLD,JHREGX_ZW,FQHM,FQXM,MQHM,MQXM,POHM,POXM,ZJXY,ZJXY_OLD,ZJXY_ZW,WHCD,WHCD_OLD,WHCD_ZW,HYZK,HYZK_OLD,HYZK_ZW,BYZK,BYZK_OLD,BYZK_ZW,SG,XX,XX_OLD,XX_ZW,ZY,ZYLB,ZYLB_OLD,ZYLB_ZW,FWCS,QRRQ,QRLB,LZGJ,LZGJ_OLD,LZGJ_ZW,QCDSSXQ,QCDSSXQ_OLD,QCDSSXQ_ZW,QCDXZ,XXJB,XXJB_OLD,XXJB_ZW,QFJG,YXQXQSRQ,YXQXJZRQ,SLYY,HLX,HLX_OLD,HLX_ZW,YHZGX,YHZGX_OLD,YHZGX_ZW,PCSMC,XZJDMC,JWHMC,JMZMC,QTZZSSXQ,QTZZSSXQ_OLD,QTZZSSXQ_ZW,QTZZJLXMC,QTZZMLPH,QTZZMLXZ,DHHM,SHGXYCW,SHGXYXM,SHGXYZZ,SHGXECW,SHGXEXM,SHGXEZZ,XJGAJGJGDM,XJGAJGJGDM_OLD,XJGAJGJGDM_ZW,PCSJGDM,PCSJGDM_OLD,PCSJGDM_ZW,XTHH,JMSFZXLH,JLXBM,HYLB,RHFLBS,NZFBS,ZZXLH,XXDZ,ZPID,XJGAJGMC,ZRQMC,MLXZ,MLPH,JLXMC,YXTBH,V_DEALFLAG,D_GXSJ,D_RKSJ,SFZHZD,HYQLBS,CZRKHDQLSSX,CZRKHDQLXZ,CZRKQCDGJ,CZRKQCPCS,CZSJ,CZLX,DELETEFLAG,DELETETIME,CZRKHHNEW,TSSJ,CZRKDBBJ,CZRKMLPBH,XTHH_NEW,SSDS,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZMHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";

        return String.format(xml, idcard);
    }

    public static String JcZykJdyformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryJcZykJdy</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>ID,DELIVERY_ITEM_TYPE,SENDER_NAME,SENDER_IDNUM,SENDER_RESIDENCE_DETAIL_ADDR,SENDER_ADDRESS,SENDER_SEX,SENDER_BIRTH,ADDRESSEE_NAME,ADDRESSEE_ADDRESS,ADDRESSEE_PHONE_NUMBER,DELIVERY_ORDER_NUMBER,COLLECT_PARCEL_PERSON_CODE,COLLECT_PARCEL_TIME,COLLECT_PARCEL_BRANCH_CODE,COLLECT_PARCEL_LTD_CODE,YTJBM,SENDER_PHONE_NUMBER,SENDER_NATION,WRITE_TIME,GPS_POSITION,ADDRESSEE_CITY_CODE,BRANCH_JURISDICTIONS,BRANCH_JURISIDICTIONS_NAME,BRANCH_NAME,BRANCH_ADDRESS,COLLECT_PARCEL_PERSON_NAME,COLLECT_PARCEL_PERSON_MOBILE,D_GXSJ,D_RKSJ,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SENDER_IDNUM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";

        return String.format(xml, idcard);
    }

//    public static <T> List<T> decoder(Class<T> tClass, String rexmlinfo) throws DocumentException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException,Exception{
//        List<T> result = new ArrayList<>();
//        Document document = DocumentHelper.parseText(rexmlinfo);
//        Element root = document.getRootElement();
//        Iterator iter = root.element("Method").element("Items").element("Item").element("Value").elementIterator();
//
//        List<Element> datas = root.element("Method").element("Items").element("Item").element("Value").elements();
//        List<String> columns = new ArrayList<>();
//        while (iter.hasNext()) {
//            Element recordEle = (Element) iter.next();
//            String title = (String) recordEle.element("Name").getData();
//            if (title.equals("ResultInfo")) {
//                Iterator iterdatas = recordEle.element("Value").elementIterator("Data");
//                while (iterdatas.hasNext()) {
//                    Element dataele = (Element) iterdatas.next();
//                    String data = (String) dataele.getData();
//                    columns.add(StringCaseUtil.change(data,"_"));
//
//                }
//            } else if (title.equals("Result")) {
//                Element elementrecords = recordEle.element("Value").element("Records");
//                if(elementrecords.element("Record")!=null){
//                    Iterator iterrecords = elementrecords.elementIterator("Record");
//                    while (iterrecords.hasNext()) {
//                        T t = tClass.newInstance();
//                        Element recordele = (Element) iterrecords.next();
//                        Iterator iterdatas = recordele.elementIterator("Data");
//                        int i = 0;
//                        while (iterdatas.hasNext()) {
//                            Element dataele = (Element) iterdatas.next();
//                            String data = (String) dataele.getData();
//                            if (data.equals("null")) {
//                                i++;
//                                continue;
//                            }
//                            String columnname = "set" + columns.get(i);
//                            Method setMethod = t.getClass().getMethod(columnname, new Class[]{String.class});
//                            setMethod.invoke(t, new Object[]{data.trim()});
//                            i++;
//                        }
//                        result.add(t);
//                    }
//                }
//            }
//        }
//        return result;
//    }
public static <T> List<T> decoder(Class<T> tClass, String rexmlinfo)  {
        List<T> result = new ArrayList<>();
        try {
            Document document = DocumentHelper.parseText(rexmlinfo);
            Element root = document.getRootElement();

            SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.s");
            SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
            SimpleDateFormat simpleDateFormat4 = new SimpleDateFormat("yy-MM-dd HH:mm:ss.s");
            Pattern pattern1 = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$");
            Pattern pattern2 = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{1}$");
            Pattern pattern3 = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$");
            Pattern pattern4 = Pattern.compile("^[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{1}$");
            List<Element> datas = root.element("Method").element("Items").element("Item").element("Value").elements();
            List<String> columns = new ArrayList<>();

            if (datas.size() > 2) {
                //xml表头
                Element head = datas.get(1);
                List<Element> fileds = head.elements();
                for (Element filedElement : fileds) {
                    String field = filedElement.getText();
                    columns.add(StringCaseUtil.change(field, "_"));
                }
                //xml数据部分
                for (int j = 2; j < datas.size(); j++) {
                    Element valueElement = datas.get(j);
                    T t = tClass.newInstance();
                    Iterator iterdatas = valueElement.elementIterator("Data");
                    List<Element> values = valueElement.elements();
                    for (int i = 0; i < values.size(); i++) {
                         Object obj = "";
                        try {
                            Class c = String.class;
                            Element dataele = values.get(i);
                            String data = (String) dataele.getText();
                            if (data.equals("null") || data.equals("") || data == null) {
                                continue;
                            }

//                            if (pattern1.matcher(data).find()) {
//                                Date date = simpleDateFormat1.parse(data);
//                                c = Date.class;
//                                obj = date;
//                            } else if (pattern2.matcher(data).find()) {
//                                Date date = simpleDateFormat2.parse(data);
//                                c = Date.class;
//                                obj = date;
//                            } else if (pattern3.matcher(data).find()) {
//                                Date date = simpleDateFormat3.parse(data);
//                                c = Date.class;
//                                obj = date;
//                            } else if (pattern4.matcher(data).find()) {
//                                Date date = simpleDateFormat4.parse(data);
//                                c = Date.class;
//                                obj = date;
//                            } else {
                                obj = data;
//                            }
                            String columnname = "set" + columns.get(i);

                            Method setMethod = t.getClass().getMethod(columnname, new Class[]{c});
                            setMethod.invoke(t, obj);
                        } catch (NoSuchMethodException e) {
                        }
                    }
                    result.add(t);

                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    return result;
}
    public static String CZRKJPGformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_V_XP_NN_CZRK_JPG</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>ID,SFZMHM,XM,XB,SSDS,XPPATH,D_GXSJ,ZPID,DJSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZMHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String JzZdryformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryJzZdry</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>BJZDRYBH,XM,XMPY,WWXM,XB_CODE,XB,CSRQ,GJ,GJ_CODE,SFZH,QTZJHM,MZ,MZ_CODE,JG,JG_CODE,HJDQH,HJDQH_CODE,HJDXZ,HJDPCS,HJDPCSDM,XZDQH,XZDQH_CODE,XZDXZ,XZDPCS,XZDPCSDM,GXDW,GXDWJGDM,LADW,LADWJGDM,ZJLASJ,NRBJZDRYKSJ,ZDRYLBBJ,ZDRYLBBJ_CODE,ZDRYXL,YJJB,ZDRYXL_CODE,YXX,YXX_CODE,JLXZSJ,JLCXSJ,JLBGSJ,DINDATE,CQ_ID,DUPDATE,CQ_DATE,ADDTIME,SCBZ_YK,LASTUPDATETIME,JLCJSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZH='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GDNNYHXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_SHSJ_GDNNYHXX</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>ADDTIME,COUNTYID,COUNTYNAME,BUSI_CUST_NAME,CUST_NAME,INSTALL_ADDR,TEL,MOBILE,CERT_TYPE,CERT_NUMBER,CUST_STATUS,STATUS_FLAG,CREATE_DATE,DATE_FLAG,SFZH</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZH='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GRKJZZNEWformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_RK_JZZ_NEW</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>LXDH,PCSMC,FXJJGMC,ID,SLBH,XM,GMSFHM,XB,MZ,CSRQ,JZDDZ,HJDZ,QFJGMC,QFRQ,YXQXJZRQ,SLSJ,YXBZ,GXSJ,LYBZ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>GMSFHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GQBYYBKXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryQBYyBkxx</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>YYBKXXNO,JZKH,BRXM,SFZH,DZ,LXDH,BKSJ,YYJGDMID,YYMC,LASTUPDATETIME,REMARKS,LASTTIME,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZH='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GAQBYYJZXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBQbYyjzxx</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>XXZJBH,XXBH,XM,GMSFHM,MZ_ZZJGDM,GHKS,LXDH,GH_SJ,ZZJGDM,DWMC,GXSJ,BZ,JCK_RKSJ,BZK_RKSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>GMSFHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GQBYYJZXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryQbYyJZxx</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>YYJZXXNO,JZKH,BRXM,SFZH,MZHM,GHKS,LXDH,GHSJ,YYJGDMID,YYMC,LASTUPDATETIME,REMARKS,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZH='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GAJGQSJDCXXBformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBJgQsjdcxxb</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>SFZM_CYZJDM,CYZJDM,SFZMMC_ZW,ZJHM,JDCSYRMC,SYQ_JDCSYQDM,JDCSYQDM,SYQ_ZW,CCDJRQ,ZJDJ_RQ,YXQZ,JDCQZBFQZ,FZJGMC,GLBM_ZZJGDM,ZZJGDM,GLBM_DWMC,FP_RQ,FZ_RQ,FDJ_RQ,FHGZ_RQ,ZZRQ,CS,BZCS,PZBHLCS,JDCDJZSBH,ZDJZSHS,JDCDABH,GXQ_XZQHDM,GXQH_XZQHDM,GXQ_XZQHMC,DYBJ_JDCDYZYBJDM,JDCDYZYBJDM,DYBJ_PDBZ,XM,CLLY,CLLY_OLD,CLLY_ZW,LSH,FDJXH,RLZL_JDCNYZLDM,JDCNYZLDM,RLZL_ZW,JDCFDJPL,JDCFDJDDJGL,ZXCS_JDCZXXSDM,JDCZXXSDM,ZXZS_ZW,JDCWKCD,JDCWKKD,JDCWKGD,JDCHXNBCD,JDCHXNBKD,JDCHXNBGD,JDCHZGBTHPS,JDCZS,JDCZJ,JDCQLJ,JDCHLJ,JDCLTGG,JDCLTS,ZZL,JDCZBZL,JDCHDZZL,JDCHDZKRS,JDCZQYZZL,JDCJSSQPZKRS,JDCJSSHPZKRS,JDCHBDBQK,CCRQ,HDFS,HDFS_OLD,HDFS_ZW,LLPZ_JDCLLPZDM,PZBH_JDCLLPZBH,LLPZH_JDCLLPZDM,JDCLLPZBH,DWMC,JG,RQ,JDCJKPZDM,JDCJKPZBH,JDCCCHGZBH,JDCNSZMZLDM,JDCNSZMBH,GXSJ,XGZL,QMBH,HMBH,BZ,JYW,ZS_XZQHDM,ZSQH_XZQHDM,XZQHMC,ZSXZ_DZMC,LXDH,ZZJZZMHM,ZZ_XZQHDM,DZMC,YZBM,ZDYZT,YXH_JDCXH,CYRY,DPHGZBH,SQDM_SQJCWHDM,SQJCWHDM,SQDM_ZW,CLYT_JDCCLYTDM,JDCCLYTDM,CLYT_ZW,YTSX,YTSX_OLD,YTSX_ZW,DZXX,JDCXSZZXBH,YDDH,JDCJYHGBZBH,LLPZY_JDCLLPZDM,LLPZE_JDCLLPZDM,LLPZ1_ZW,LLPZS_JDCLLPZDM,JDCLLPZDM,LLPZ2_ZW,NSZM_JDCNSZMDM,JDCNSZMDM,NSZM_ZW,ZT_JDCZTDM,JDCZTDM,ZT_ZW,XXBH,HPZL_JDCHPZLDM,JDCHPZLDM,HPZL_ZW,HPHM_JDCHPHM,ZWPP,CLXH,YWPP,GCJK_JDCGCJKFLDM,JDCGCJKFLDM,GCJK_ZW,ZZG_GJHDQDM,GJHDQDM,ZZG_ZW,ZZC_DWMC,CLSBDH,JDCFDJDDJH,CCLX_JDCCLLXDM,JDCCLLXDM,CLLX_ZW,CSYS_JDCCSYSDM,JDCCSYSDM,YS,SYXZ_JDCSYXZDM,JDCSYXZDM,SYXZ_ZW,YXT_XXBH,SFZHZD,RK_SJ,SFCLBZ,D_GXSJ,XMHYPY,JDCXH,JDCHPHM,XXSCBS,SC_SJ,PDBZ,XZQHDM,JCK_RKSJ,BZK_RKSJ,SCBZ_YK</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>ZJHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GJJTBEMPLOYEEformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_JJ_TB_EMPLOYEE</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>EMPLOYEE_NO,EMPLOYEE_TYPE,EMPLOYEE_NAME,PAPERS_TYPE,PAPERS_VALUE,MAILING_ADDRESS,MOBILE_PHONE,FIXED_PHONE,CREATE_TIME,CREATE_USER,UPDATE_TIME,UPDATE_USER,HOME_ADDRESS,EMPLOYEE_SEX,OLD_HPHM,OLD_EBIKE_XH,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>PAPERS_VALUE='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GJJTBEBIKEformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_JJ_TB_EBIKE</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>EBIKE_NO,EBIKE_STATUS,PLATE_TYPE,PLATE_NO,OWNER_USER_NO,WEIGHT,MAX_SPEED,PEDAL,MOTOR_POWER,COLOR_ONE,COLOR_TWO,COLOR_THREE,BRAND_NO,BRAND_NAME,ENTERPEISE_NAME,FRAME,ELECTRICAL,PRODUCTION_TIME,ORIGIN_VOUCHER_KEY,ORIGIN_VOUCHER_VALUE,QUALIFICATION,CREATE_TIME,CREATE_USER,UPDATE_TIME,UPDATE_USER,GABARITE,BRAND_MODEL,PLATE_AREA,CREATE_DEPT,OLD_HPHM,REQUEST_NO,SERIAL_NUMBER,REQUEST_TIME,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>OWNER_USER_NO='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String xthh_newformater(String xthh_new) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_QS_CZRK</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>SYSTEMID,RYBH,DZBM,ZT,ZT_OLD,ZT_ZW,YWLX,SLSJ,ZXBS,SWRQ,SWZXLB,QCRQ,QCZXLB,QWGJ,QWDSSX,QWDSSX_OLD,QWDSSX_ZW,QWDXZ,XMPY,DQM,DQM_OLD,DQM_ZW,SSSSXQ,SSSSXQ_OLD,SSSSXQ_ZW,PCSDM,PCSDM_OLD,PCSDM_ZW,ZRQDM,XZJDDM,JWHDM,JMZDM,SFZMHM,XM,CYM,XB,XB_OLD,XB_ZW,MZ,MZ_OLD,MZ_ZW,CSRQ,CSSJ,CSDGJ,CSDGJ_OLD,CSDGJ_ZW,CSDSSX,CSDSSX_OLD,CSDSSX_ZW,CSDXZ,JGGJ,JGGJ_OLD,JGGJ_ZW,JGSSX,JGSSX_OLD,JGSSX_ZW,JHRYHM,JHRYXM,JHRYGX,JHRYGX_OLD,JHRYGX_ZW,JHREHM,JHREXM,JHREGX,JHREGX_OLD,JHREGX_ZW,FQHM,FQXM,MQHM,MQXM,POHM,POXM,ZJXY,ZJXY_OLD,ZJXY_ZW,WHCD,WHCD_OLD,WHCD_ZW,HYZK,HYZK_OLD,HYZK_ZW,BYZK,BYZK_OLD,BYZK_ZW,SG,XX,XX_OLD,XX_ZW,ZY,ZYLB,ZYLB_OLD,ZYLB_ZW,FWCS,QRRQ,QRLB,LZGJ,LZGJ_OLD,LZGJ_ZW,QCDSSXQ,QCDSSXQ_OLD,QCDSSXQ_ZW,QCDXZ,XXJB,XXJB_OLD,XXJB_ZW,QFJG,YXQXQSRQ,YXQXJZRQ,SLYY,HLX,HLX_OLD,HLX_ZW,YHZGX,YHZGX_OLD,YHZGX_ZW,PCSMC,XZJDMC,JWHMC,JMZMC,QTZZSSXQ,QTZZSSXQ_OLD,QTZZSSXQ_ZW,QTZZJLXMC,QTZZMLPH,QTZZMLXZ,DHHM,SHGXYCW,SHGXYXM,SHGXYZZ,SHGXECW,SHGXEXM,SHGXEZZ,XJGAJGJGDM,XJGAJGJGDM_OLD,XJGAJGJGDM_ZW,PCSJGDM,PCSJGDM_OLD,PCSJGDM_ZW,XTHH,JMSFZXLH,JLXBM,HYLB,RHFLBS,NZFBS,ZZXLH,XXDZ,ZPID,XJGAJGMC,ZRQMC,MLXZ,MLPH,JLXMC,YXTBH,V_DEALFLAG,D_GXSJ,D_RKSJ,SFZHZD,HYQLBS,CZRKHDQLSSX,CZRKHDQLXZ,CZRKQCDGJ,CZRKQCPCS,CZSJ,CZLX,DELETEFLAG,DELETETIME,CZRKHHNEW,TSSJ,CZRKDBBJ,CZRKMLPBH,XTHH_NEW,SSDS,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>XTHH_NEW='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";

        return String.format(xml, xthh_new);
    }

    public static String WECHATLISTformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBLzWechatFriendlist</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>XXZJBH,XM,GMSFHM,JZ_YDDH,MICROMSG_ACCOUNT,SEX,USERNAME,WX_WM,WX_BZ,QQUIN,WM,DZXX,YDDH,WEIBO,SIGN,XZQHMC,DOMAIN,BZ,JLSC_SJ,XXSCBS,XXBH,IMPSOURCE,JCK_RKSJ,BZK_RKSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>GMSFHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String QQFRIENDLISTformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBLzQqAccount</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>UNIT,LOGINUSER,XXBH,XM,ZJHM,SJ_YDDH,QQ_ID,WM,QQ_ID_TYPE,QQ_VERSION,RQ,ZZ_SJ,SIGN,YDDH,DZXX,CSRQ,SEX,DZMC,ZHSL_SJ,JLSC_SJ,CJ_XXBH,IMPSOURCE,JCK_RKSJ,BZK_RKSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>ZJHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GALKGNLKNEWformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_GA_LK_GNLK_NEW</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>WYBZ,RYBH,XM,FAYIN,XBDM,MZDM,CSRQ,CYZJDM,ZJHM,XZQHDM,DZMC,RZ_SJ,RUZHUFANGHAO,TF_SJ,ZZJGDM,FWCS,XINYONGKALX,XINYONGKAHAO,GAJGJGDM,GAJGMC,TUOJISHEBEIBZ,QY_ZZJGDM,XXZJBH,QTCP_SJ,QTDB_SJ,QTSC_SJ,WWJS_SJ,NWJS_SJ,CHUANSONGBZ,HYLBDM,SFZZPID,XCZPID,SHIFOUHC,BIDUIFLAG,GZDX_BIDUIFLAG,GX_SJ,JCK_RKSJ,BZK_RKSJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>ZJHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GAMHJCGXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBzMhJcgxxNew</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>ID,PNR_REF,PNR_CR_DT,AIR_CARR_CD,AIR_SEG_FLT_NBR_SFX,AIR_SEG_FLT_NBR,AIR_SEG_DPT_DT_LCL,AIR_SEG_DPT_TM_LCL,AIR_SEG_ARRV_TM_LCL,AIR_SEG_ARRV_DT_LCL,AIR_SEG_DPT_AIRPT_CD,AIR_SEG_ARRV_AIRPT_CD,SUB_CLS_CD,OFFC_CD,OPR_STAT_CD,RSP_AIRLN_CD,RSP_OFC_CD,PAS_ID,PAS_LST_NM,PAS_FST_NM,PAS_CHN_NM,PAS_ID_TYPE,PAS_ID_NBR,FFP_ID_NBR,GRP_IND,GRP_NM,VIP_IND,PN_SEAT,OPERATEDATE,OPERATETIME,FILENAME,CT_DT,D_RKSJ,SYSTEMID,DELETEFLAG,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>PAS_ID_NBR='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GAQBKYformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryBQbKy</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>XZQHMC,BX_JE,E_JE,JE,REPRINTTIMES,RYBH,DWYWSX,FLAG,DELOPER,ZF_SJ,BXD_XXBH,XXBH,COMP,XM,GMSFHM,CYZJDM,BNAME,PRODUCTCODE,LEVELCODE,PRINTCODE,YW_JE,SH_JE,QCZ_DWMC,R02,R_DWMC,R04,R05,R06,R07,GXSJ,XXZJBH,DWMC,SEX,CLPH,SJ_XM,SJ1DH,SJE_XM,SJ2DH,SJS_XM,SJ3DH,POLICYNO,CSRQ,JCK_RKSJ,BZK_RKSJ,CPH_XXBH,SEAT,GP_SJ,DY_SJ,FC_SJ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>GMSFHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>15</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GCRJCJSQXXformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryJcCrjCjsqxx</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>STGLXX,STBZXX,SJBH,ZWBH,RWBH,SFSB,SFDZZJ,ZWMBXRGAQ,SQH,TJBH,LXTH,SFLYHZ,YYSLSJ,LYFPH,QZZL,JZZL,QZHM,JFFS,QRBZ,HKQRQK,YDDRXBDBZ,YDYRXBDBZ,YDBZRYLB,JJQK_LXR,JJQK_LXRDH,EMSDH,JJZL,JJYY,OLD_SQID,DAH2,ZDSPBZ,ZZSLBZ,ZZSLSZBZ,ZZSLSZDW,ZZSLSZRQ,SZQM,XPTM,YDLB,QZDW,QZDZ,YYQZRQ_CHAR,TDXZQH,SFMCLBH,LXTXXB_ID,BJCZJMBZ,YJJZD,QZFSDD,CJKA,D_GXSJ,D_RKSJ,V_DEALFLAG,ADDTIME,SCBZ_YK,SFXQZ,SFXJZ,SFCJZP,SFYJRGA,JRGARQ,LPZX,LPZM,BZ,SCBZ,SSBZ,JSBZ,TBDWBH,ZHXGR,ZHXGSJ,YWX,YWM,YWXM,ZWX,ZWM,ZWXM,ZWXMGB2312,ZWXMFT,XB,CSRQ,SFZH,GJDQ,RYDYLB,CSD,SLRQCHAR,SPRQCHAR,ZZZRQCHAR,ZQZRQCHAR,ZZRQCHAR,FZRQCHAR,ZWTXCJJG,ZWMBCJJG,ZZZNM1,ZZZNM2,SQ_ID,RY_ID,RYBH,YWBH,SQLB,BZLB,BM,MZ,HYZK,ZZMM,WHCD,GZDW,ZY,ZWZC,LXDH,HKSZD,SSPCS,JTZZ,SFXTKZD,SJR,YZBM,EMSDZ,SFXSJFSSPZK,SJHM,SWBADWBH,SWBADWMC,DBDW,BRJL,QWD,CJSY,DJSY,XCZJZL,XCZJHM,XCZJQFRQ,XCZJYXQZ,SBZJHM,SBQZHM,SLDW,SLRQ,SLR,SPDW,SPRQ,SPR,SPJG,BPZYY,ZZRQ,FZRQ,GDRQ,JJBS,TBBS,HDBH,SFQRBZ,SFLB,SFJE,SFBZ,SYHBS,SFSYHSJ,SFYHFKSJ,TFSYHSJ,TFYHFKSJ,QRSFSJ,QRSFR,QRTFSJ,QRTFR,XXRS,XXID,DAH,XXLY,XXJB,GLYWBH,YYQZRQ,SFXXZ</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>SFZH='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GWBWBSWRY2formater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>QueryWbSwryxx</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>NID,YYCSDM,YYCSMC,DZQH,DZ,SWRYXM,ZJLX,ZJHM,FZJGMC,GJ,SWKSSJ,SWZDH,XWSJ,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>ZJHM='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }

    public static String GLZPERSONformater(String idcard) {
        String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "<Request>\n" +
                "<SenderID>AEC77852-1759-4CB8-9572-19D6F47A375C</SenderID>\n" +
                "<Method>\n" +
                "<Name>Query_G_LZ_PERSON</Name>\n" +
                "<Security Algorithm=\"\" />\n" +
                "</Method>\n" +
                "<Items>\n" +
                "<Item>\n" +
                "<Name>RequiredItems</Name>\n" +
                "<Value Type=\"arrayof_string\">\n" +
                "<Data>ID,NO,COPNO,NAME,ALIAS,SEX,IDCARD,PHONE,IMSI,IMEI,CELLTYPE,ORG,ADDR,PLACE,REMARK,PAPERSTYPE,WRITEDATE,DEVICE_NO,IMPTIME,TRANS_ADDR,ISREDNO,ISCRIMINAL,IMPSOURCE,CREATEUSER,QQ,CASENO,UNIT,LOGINUSER,MODIFYUSER,MODIFYTIME,REGISTERTIME,REGISTERADDR,TEL,SUSPECTNO,PERSONKINDS,POISON,CASEDETAIL_REFER,CASEKIND_REFER,CASESUBKIND_REFER,MAC,OS,SIMICCID,BASIS,CONTROLS,PERSONTYPES,CJR,SPR,VER108,SOFTVER108,REQUEST_IP,IS_SHARE,GATHER_PERSON,ADDTIME</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>Condition</Name>\n" +
                "<Value Type=\"string\">\n" +
                "<Data>IDCARD='%s'</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>StartPosition</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>0</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>MaxResultCount</Name>\n" +
                "<Value Type=\"long\">\n" +
                "<Data>100</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "<Item>\n" +
                "<Name>RequestResultCount</Name>\n" +
                "<Value Type=\"boolean\">\n" +
                "<Data>true</Data>\n" +
                "</Value>\n" +
                "</Item>\n" +
                "</Items>\n" +
                "</Request>";
        return String.format(xml, idcard);
    }
}
